#FROM findepi/graalvm:java17-native
# IBM openj9
FROM ibm-semeru-runtimes:open-17.0.11_9-jdk

MAINTAINER org.my

RUN mkdir -p /joker/server/logs \
    /my/server/temp \
    /my/skywalking/agent

WORKDIR /my/server

ENV SERVER_PORT=8080 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""

EXPOSE ${SERVER_PORT}

ADD ./target/my-admin-starter.jar ./app.jar

ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
           # 应用名称 如果想区分集群节点监控 改成不同的名称即可
           #-Dskywalking.agent.service_name=my-server \
           #-javaagent:/my/skywalking/agent/skywalking-agent.jar \
           -XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC ${JAVA_OPTS} \
           -jar app.jar

